import request from '@/utils/request'


import {baseUrlConfig} from "@/config/config";
const basePath = baseUrlConfig.businessBaseUrl;

// 初始化评分规则
export const initAssessRule = (data:any) => {
  return request({
    url: basePath + '/tcdmSecureHazardAssessmentRules/findPage',
    method: 'post',
    data
  })
}
// 新增规则
export const addRule = (data:any) => {
  return request({
    url: basePath + '/tcdmSecureHazardAssessmentRules/add',
    method: 'post',
    data
  })
}
//编辑
export const editRule = (data:any) => {
  return request({
    url: basePath + '/tcdmSecureHazardAssessmentRules/put',
    method: 'put',
    data
  })
}
//删除
export const deleteRule = (data:any) => {
  return request({
    url: basePath + '/tcdmSecureHazardAssessmentRules/del',
    method: 'delete',
    data
  })
}
// 模板下载
export const download = () => {
  return request({
    url: basePath + '/secure/assessRule/download',
    responseType: 'blob',
    method: 'post'
  })
}
// 导入列表
export const listImport = (data: any) => {
  return request({
    url: basePath + '/secure/assessRule/import',
    method: 'post',
    data
  })
}

// 初始化隐患等级
// export const initEarlyLevel = () => {
//   return request({
//     url: basePath + '/secure/assessRule/initEarlyLevel',
//     method: 'get'
//   })
// }
